/**
 * 
 * 15将字符串中的大小写转换
 */


const exchangeLetter = (str:string)=>{
    const strarr = str.split('')
    for(let i = 0;i<strarr.length;i++){
        const charCode = strarr[i].charCodeAt(0)
        if(charCode<=90 && charCode >= 65){
            strarr[i] = strarr[i].toLowerCase()
        }else if(charCode<=122 && charCode >= 97){
            strarr[i] = strarr[i].toUpperCase()
        }else{

        }
    }

    return strarr.join('')
}

const zxzx = exchangeLetter('AaAaVVVVvvvBv')
console.log(zxzx)